home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / Apple Shared Library Manager / ASLM Examples / Inspector / Sources / List.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-19  |  2.3 KB  |  80 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        List.h
  3.  
  4.     Contains:    Interface for TList class, a front end to the list manager.
  5.  
  6.     Copyright:    © 1991-1994 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10.  
  11. #ifndef __LIST__
  12. #define __LIST__
  13.  
  14. #ifndef __LISTS__
  15. #include <Lists.h>
  16. #endif
  17.  
  18. #ifndef __LIBRARYMANAGER__
  19. #include <LibraryManager.h>
  20. #endif
  21.  
  22. #define kTListID "appl:insp$TList,1.2"
  23.  
  24. class TList : public TDynamic
  25. {
  26. public:
  27.                     TList();
  28.                     TList(const Rect *rView, const Rect *dataBounds, Point cSize,
  29.                         short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow,
  30.                         Boolean scrollHoriz, Boolean scrollVert);
  31.                     ~_CDECL TList();
  32.                     
  33.     virtual    short    AddColumn(short count,short colNum);
  34.     virtual    short    AddRow(short count, short rowNum);
  35.     virtual    short    AddRow(short count);
  36.     virtual    void    DelColumn(short count,short colNum);
  37.     virtual    void    DelRow(short count,short rowNum);
  38.  
  39.     virtual    void    AddToCell(const void *dataPtr,short dataLen,Cell theCell);
  40.     virtual    void    ClrCell(Cell theCell);
  41.     virtual    void    GetCell(void *dataPtr,short *dataLen,Cell theCell);
  42.     virtual    void    SetCell(const void *dataPtr,short dataLen,Cell theCel);
  43.     virtual    void    CellSize(Point cSize);
  44.     virtual    Boolean    GetSelect(Boolean next,Cell *theCell);
  45.     virtual    void    SetSelect(Boolean setIt,Cell theCell);
  46.     
  47.     virtual    Boolean    Click(Point pt,short modifiers);
  48.     virtual    Cell    LastClick();
  49.  
  50.     virtual    void    Find(short *offset,short *len,Cell theCell);
  51.     virtual    Boolean    NextCell(Boolean hNext,Boolean vNext,Cell *theCell);
  52.     virtual    void    CellRect(Rect *cellRect,Cell theCell);
  53.     virtual    Boolean    Search(const void *dataPtr,short dataLen,ListSearchUPP searchProc,
  54.                             Cell *theCell);
  55.     virtual    void    Size(short listWidth,short listHeight);
  56.  
  57.     virtual    void    Draw(Cell theCell);
  58.     virtual    void    DoDraw(Boolean drawIt);
  59.     virtual    void    Scroll(short dCols,short dRows);
  60.     virtual    void    AutoScroll();
  61.     virtual    void    Update(RgnHandle theRgn);
  62.     virtual    void    Activate(Boolean act);
  63.             
  64.     virtual    void    SetSelFlags(char theFlags);
  65.     virtual    short    GetLastRow();
  66.     virtual    short    GetLastColumn();
  67.     virtual    ListHandle    GetList();
  68.     virtual    Rect    GetListRect();
  69.     
  70. private:
  71.     virtual    void        InitList(const Rect *rView, const Rect *dataBounds, Point cSize,
  72.                             short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow,
  73.                             Boolean scrollHoriz, Boolean scrollVert);
  74.  
  75. protected:
  76.     ListHandle        fList;
  77. };
  78.  
  79. #endif
  80.